/* 消息页面样式 */

/* 消息容器 */
.message-container {
  height: calc(100vh - 60px);
}

/* 左侧菜单样式 */
.message-aside {
  background-color: #f5f7fa;
  border-right: 1px solid #e6e9f0;
  display: flex;
  flex-direction: column;
}

.message-tabs {
  padding: 15px 0;
}

.message-tab-item {
  padding: 12px 20px;
  display: flex;
  align-items: center;
  cursor: pointer;
  transition: all 0.3s;
}

.message-tab-item:hover {
  background-color: #ecf5ff;
}

.message-tab-item.active {
  background-color: #ecf5ff;
  color: #409eff;
}

.message-tab-item i {
  font-size: 18px;
  margin-right: 10px;
}

.message-tab-item span {
  flex: 1;
}

/* 联系人列表 */
.contacts-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  border-top: 1px solid #e6e9f0;
}

.contacts-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  font-weight: bold;
}

.search-contacts {
  padding: 0 15px 10px;
}

.contacts-list {
  flex: 1;
  overflow-y: auto;
}

.contact-item {
  display: flex;
  align-items: center;
  padding: 10px 15px;
  cursor: pointer;
  transition: all 0.3s;
}

.contact-item:hover {
  background-color: #f0f2f5;
}

.contact-item.active {
  background-color: #ecf5ff;
}

.contact-info {
  flex: 1;
  margin-left: 10px;
  overflow: hidden;
}

.contact-name {
  font-weight: bold;
  margin-bottom: 3px;
}

.contact-preview {
  font-size: 12px;
  color: #909399;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.contact-meta {
  text-align: right;
}

.contact-time {
  font-size: 12px;
  color: #909399;
  margin-bottom: 5px;
}

/* 右侧消息内容 */
.message-main {
  padding: 0;
  display: flex;
  flex-direction: column;
}

/* 聊天界面 */
.chat-container {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  border-bottom: 1px solid #e6e9f0;
}

.chat-title {
  font-weight: bold;
  font-size: 16px;
}

.chat-messages {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  background-color: #f5f7fa;
}

.message-item {
  display: flex;
  margin-bottom: 20px;
}

.message-item.message-self {
  flex-direction: row-reverse;
}

.message-content {
  margin: 0 10px;
  max-width: 70%;
}

.message-self .message-content {
  text-align: right;
}

.message-text {
  padding: 10px 15px;
  border-radius: 10px;
  background-color: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  display: inline-block;
}

.message-self .message-text {
  background-color: #ecf5ff;
  color: #409eff;
}

.message-time {
  font-size: 12px;
  color: #909399;
  margin-top: 5px;
}

.chat-input {
  padding: 15px;
  border-top: 1px solid #e6e9f0;
}

.input-tools {
  margin-bottom: 10px;
}

.input-actions {
  margin-top: 10px;
  text-align: right;
}

/* 消息列表 */
.message-list-container {
  height: 100%;
  padding: 20px;
  overflow-y: auto;
}

.empty-message {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #909399;
}

.empty-message i {
  font-size: 48px;
  margin-bottom: 10px;
}

.message-list-item {
  display: flex;
  padding: 15px;
  margin-bottom: 10px;
  background-color: #fff;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  cursor: pointer;
  transition: all 0.3s;
}

.message-list-item:hover {
  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
}

.message-list-item.unread {
  border-left: 3px solid #409eff;
}

.message-list-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: #ecf5ff;
  color: #409eff;
  border-radius: 50%;
  margin-right: 15px;
}

.message-list-content {
  flex: 1;
}

.message-list-title {
  font-weight: bold;
  margin-bottom: 5px;
}

.message-list-text {
  color: #606266;
  margin-bottom: 5px;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.message-list-time {
  font-size: 12px;
  color: #909399;
}

.message-list-actions {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* 联系人提示 */
.select-contact-tip {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #909399;
  background-color: #f5f7fa;
}

.select-contact-tip i {
  font-size: 48px;
  margin-bottom: 10px;
}

/* 新增聊天对话框 */
.new-chat-search {
  margin-bottom: 15px;
}

.new-chat-users {
  max-height: 300px;
  overflow-y: auto;
}

.new-chat-user-item {
  display: flex;
  align-items: center;
  padding: 10px;
  cursor: pointer;
  transition: background-color 0.3s;
  border-radius: 4px;
}

.new-chat-user-item:hover {
  background-color: #f0f2f5;
}

.new-chat-user-item .user-info {
  margin-left: 10px;
}

.new-chat-user-item .user-name {
  font-weight: bold;
}

.new-chat-user-item .user-account {
  font-size: 12px;
  color: #909399;
}

/* 响应式调整 */
@media (max-width: 768px) {
  .message-aside {
    width: 180px !important;
  }
  
  .message-tab-item {
    padding: 10px 15px;
  }
  
  .contact-preview {
    display: none;
  }
}

@media (max-width: 480px) {
  .message-container {
    flex-direction: column;
  }
  
  .message-aside {
    width: 100% !important;
    height: 50px;
    flex-direction: row;
    overflow-x: auto;
  }
  
  .message-tabs {
    display: flex;
    padding: 0;
    width: 100%;
  }
  
  .message-tab-item {
    flex-direction: column;
    justify-content: center;
    padding: 5px 15px;
  }
  
  .message-tab-item i {
    margin-right: 0;
    margin-bottom: 3px;
  }
  
  .contacts-container {
    display: none;
  }
} 